package com.dsjy.yf.address.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsjy.yf.address.entity.dataobject.YardDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author whj
 * @version 1.0
 * @date 2021-01-15 9:43
 */
public interface YardMapper extends BaseMapper<YardDO> {

    /**
     * 根据区划代码查找院落所有信息
     *
     * @param parentCode
     * @return
     */
    List<YardDO> searchYardWithCode(Integer parentCode, Boolean flag);

    /**
     * 增加院落
     *
     * @param yardDO
     * @return
     */
    Integer addYard(@Param("yardDO") YardDO yardDO);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    Integer delYard(Integer id);

    /**
     * 通过id查找院落
     *
     * @param id
     * @return
     */
    YardDO searchYardWithId(Integer id);

    /**
     * 更新
     *
     * @param yardDO
     * @return
     */
    Integer updateYard(@Param("yardDO") YardDO yardDO);
}
